package chapter09

/**
  * @Copyright: Shanghai Definesys Company.All rights reserved.
  * @Description:
  * @author: chuhaitao
  * @since: 2019/1/9 21:55
  * @history:
  *          1.2019/1/9 created by chuhaitao
  */
object TraitDemo02 {
  def main(args: Array[String]): Unit = {
  }


}

trait Trait01 {
  //定义一个规范
  def getCont(): String
}

class A {

}

class B extends A with Trait01 {
  override def getCont(): String = {

    ""
  }
}

class C extends A {

}

class D {

}

class E extends D with Trait01 {
  override def getCont(): String = {
    ""
  }
}

class F extends D {

}